package com.mls.fivedistrict.server;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.support.CorrelationData;
import org.springframework.stereotype.Service;

/**
 * Created by chenxiuxiang on 2018/5/5.
 */
@Slf4j
@Service("confirmCallBackListener")
public class ConfirmCallBackListener implements RabbitTemplate.ConfirmCallback {
    int sum = 0;

    @Override
    public void confirm(CorrelationData correlationData, boolean ack, String cause) {
//       log.info("confirm--:correlationData:"+correlationData+",ack:"+ack+",cause:"+cause);
        log.info("ConfirmCallBackListener sum:{}", sum++);
    }
}